class Exploitdb < Formula
  desc "The official Exploit Database"
  homepage "https://www.exploit-db.com/"
  url "https://github.com/offensive-security/exploit-database.git",
    :tag => "2016-12-24",
    :revision => "26b1e8b6ad08009a4104ba1b3673e73f48154901"
  version "2016-12-24"
  head "https://github.com/offensive-security/exploit-database.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "b559e66758d3a9f9d5c2002618855c649c3a67c731e27d215db8a56902dab9b5" => :sierra
    sha256 "1899357a1e3e09fbb1bec196b429a2cb1c59b443189899c0be14b3847e380dcb" => :el_capitan
    sha256 "46dc059f40fba19366b4a616e3cdc2ee90496ae5df6666ef02902553c94bae72" => :yosemite
  end

  def install
    inreplace "searchsploit", "gitpath=\"/opt/exploit-database\"", "gitpath=\"#{pkgshare}\""
    bin.install "searchsploit"
    pkgshare.install %w[files.csv platforms .git]
  end

  test do
    system "#{bin}/searchsploit", "sendpage"
  end
end
